package com.itheima.comment.controller;

import com.itheima.comment.dto.CommentSaveDto;
import com.itheima.comment.service.CommentService;
import com.itheima.common.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @version 1.0
 * @description 说明
 * @package com.itheima.comment.controller
 */
@RestController
@RequestMapping("/comment")
public class CommentController {

    @Autowired
    private CommentService commentService;
    
    @PostMapping("/save")
    public ResultVo save(@RequestBody CommentSaveDto dto){
        commentService.save(dto);
        return ResultVo.ok();
    }
}
